#ifndef FORM_JSDZ_H
#define FORM_JSDZ_H

#include <QWidget>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QNetworkInterface>
#include <QNetworkRequest>
#include <QJsonObject>
#include <QJsonArray>
#include <QSqlQuery>
#include <QMap>
#include <QSqlQueryModel>
#include <QListWidgetItem>
#include <QSqlQueryModel>


namespace Ui {
class Form_jsdz;
}

class Form_jsdz : public QWidget
{
    Q_OBJECT

public:
    explicit Form_jsdz(QWidget *parent = nullptr);
    ~Form_jsdz();
    bool putBaseIn( QJsonObject &in, QString code);

signals:

    void destroyW(QString);

private slots:
    void closeEvent(QCloseEvent *event);
    void showEvent(QShowEvent *event) ; //override();

    void on_pbRun_clicked();
    void on_pbUpload_clicked();
    void on_pbCalculate_clicked();
    void on_pbExit_clicked();


    void on_tv_insu_sum_clicked(const QModelIndex &index);

    void on_tv_insu_sum_doubleClicked(const QModelIndex &index);

    void on_pbSearch_clicked();

    void on_pb2601_clicked();

    void on_lwMsgid_doubleClicked(const QModelIndex &index);

    void on_pb_2208_clicked();

    void on_lwMsgid_clicked(const QModelIndex &index);

private:
    Ui::Form_jsdz *ui;

    QSqlQuery *qrm, *qro;
    QString sq;

    QNetworkRequest request;
    QNetworkAccessManager manager ;
    QJsonObject ret3201;
    QJsonObject ret3202;
    QJsonObject ret9101;

    QJsonObject ob_v_out_2207;

    QString oinfno;//交易代码
    QString psn_no;//个人医保编号
    QString currentMsgid;
    QString downloadPath;

    bool hasZip;

    bool has_insu_privilege;//医保操作权限

    QSqlQueryModel * md_insu_sum;
    QString cur_insu_type;
    QString clinic_code;

};

#endif // FORM_JSDZ_H
